{extend name="public/base"/}
{block name="style"}
<link href="__PUBLIC__/ieasy/css/classify.css?v=2.1.49" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__PUBLIC__/ieasy/css/vendor.css" />
<link href="__PUBLIC__/ieasy/css/font_apds0v8n2bhp8pvi.css" rel="stylesheet">
<link href="__PUBLIC__/ieasy/css/front.css" rel="stylesheet">
<style>
    .weui_article {
        margin-bottom: 30px;
        font-size: 18px;
        font-weight: normal;
        line-height: 170%;
    }

    .weui_article p {
        margin: .7em 0;
        text-indent: 2em;
    }
    .btn {
		border: 1px solid #df62e4;
		background: #df62e4;
		text-align: center;
		color: #fff;
		height: 40px;
		line-height: 39px;
		padding: 0 8px;
		margin: 12px auto;
		display: inline-block;
		border-radius: 6px;
	}
    .input_box{border: 1px #cdcdcd solid;border-bottom: 0 none;background: #fff; position: relative;}
	.input_box.short{width: 50%}
	.input_box.last{border-bottom: 1px #cdcdcd solid;}
	.input_box input{border: 0 none; background: #fff; height: 42px; line-height: 42px;text-indent: 6px; width: 100%}
	.input_box textarea{border: 0 none; background: #fff; height: 120px; line-height: 42px;text-indent: 6px; width: 100%}
	.input_box label{position: absolute; left: 6px; top:10px; color:#bfbfbf}
	.input_box.error label{color:#ff1e1e}
	.btn{border:1px solid #7ccae1;background: #10AEFF; text-align: center; color: #fff; height: 40px; line-height: 39px; padding: 0 8px; margin:12px auto; display: inline-block;border-radius: 6px;}
	a.btn{color: #fff;}
	.btn.block{display: block;padding: 0;}
	button.btn.block{width: 100%}
	.btn.red{border-color: #c7ce19; background: #c7ce19; color: #fff}
	a.btn.red{color: #fff}
	.btn.white{border-color: #d4d4d4; background: #fff; color: #313030}
	a.btn.white{color: #313030}
	.btn.light-blue{border-color: #52b7ed; background: #52b7ed; color: #fff}
	a.btn.light-blue{color: #fff}
	.btn.liner{
		background:linear-gradient(#FFF,#e5e5e5) repeat scroll 0 0 transparent;
		background:-moz-linear-gradient(#fff,#e5e5e5);
		background:-webkit-gradient(linear,center top,center bottom,from(#fff),to(#e5e5e5));
		background:-webkit-linear-gradient(#fff,#e5e5e5);
		border-color: #d4d4d4;
		color:#333
	}
	.btn.disabled{color:#7d7d87;background: #efefef}
	.no-margin{margin: 0}
	.no-margin-bottom{margin-bottom: 0}
	.no-margin-top{margin-top: 0}
	img.captcha {
		width:132px !important;border: 1px solid #CDCDCD;
	}
	.mgt12 {
		margin-top: 12px;
	}
	.fn-right {
		float: right;
	}

	.fn-left, .fn-right {
		display: inline;
	}
	.input_box.last {
		border-bottom: 1px #cdcdcd solid;
	}
	.input_box.short {
		width: 50%;
	}
	.mgt12 {
		margin-top: 12px;
	}
	.input_box {
		border: 1px #cdcdcd solid;
		border-bottom: 0 none;
		background: #fff;
		position: relative;
	}
	.fn-left {
		float: left;
	}
	.fn-left, .fn-right {
		display: inline;
	}
	.panel {
		padding: 16px 12px;
	}
	.other_login {
		overflow: auto;
		text-align: center;
	}
	.other_login a.reg_link {
		color: #2897ed;
	}
	a:visited {
		color: #313030;
	}
	a:link {
		color: #313030;
	}
	.fn-right {
		float: right;
	}
	.fn-left, .fn-right {
		display: inline;
	}
	ins, a {
		text-decoration: none;
	}
	.mod_content {
		padding: 3px 12px;
		background-color: #fff;
		overflow: auto;
		line-height: 40px;
		font-size: 16px;
	}
	.mod_content.c1{
		background-color: #fff;
		line-height: 1.8em;
	}
	.mod_content.c1 ul>li{
		padding: 5px 0
	}
	.mod_content.c1 ul>li a{
		display: inline-block;
		color:#2897ed
	}
    </style>
{/block}
{block name="body"}
        <div id="console_main"></div>
<div class="head_tit_box">
    <a href="javascript:;" class="head_return_page_but"></a>
        <div class="head_menu_but_box">
        <a href="javascript:;" class="head_menu_but"></a>
    </div>
        <h1>登录</h1>
</div>
<!--导航-->
{block name="include"}{include file="public:dropnav" /}{/block}
 <!--pop_up_menu_box 菜单弹框-->
        <div style="padding-bottom:0">
            <div style="padding-top: 50px;"></div>
            <div class="panel">
                <div class="err_msg fn-hide">
                </div>
                <form class="vail" id="login">
					<input type="hidden" name="backurl" value="{$backurl}">
                    <div class="input_box">
                        <input autocomplete="off" placeholder="手机号" class="required" id="user" name="username" type="text" value="">
                        </input>
                    </div>
                    <div class="input_box last">
                        <input class="required"  placeholder="密码" id="pass" name="password" type="password" value="">
                        </input>
                    </div>
                    <div class="fn-clear">
                        <div class="input_box short last mgt12 fn-left">
                            <input class="required" placeholder="验证码" id="captcha" name="captcha" type="text" value="">
                            </input>
                        </div>
						<img src="{:url('login/verify')}" class="captcha fn-right mgt12" style="width: auto" id="captcha" style="cursor: pointer;width:130px" onclick="this.src='{:url('login/verify')}?d='+Math.random();" title="点击刷新" alt="captcha" />
                    </div>
                    <div style="clear: both;"></div>
                    <button class="btn block btn_login" type="button">
                        登录
                    </button>
                </form>
                <div class="other_login">
					<a href="/login/forget?backurl={$backurl|urlencode}" class="fn-left reg_link">忘记密码？</a>
                    <a class="fn-right reg_link" href="/register?backurl={$backurl|urlencode}">
                        没有帐号？立即注册»
                    </a>
                </div>
            </div>
           
        </div>
	
	 {block name="include"}{include file="public:tabbar" /}{/block}
{/block}
{block name="script"}
<script type="text/javascript" src="__PUBLIC__/ieasy/js/zepto.min.js?v=2.1.49"></script>
<script type="text/javascript" src="__PUBLIC__/ieasy/js/zepto.cookie.min.js?v=2.1.49"></script>
<script type="text/javascript">
    $(function () {
    //返回
    $('.head_return_page_but').click(function () {
        window.history.go(-1);
    });

    //菜单//{{{md5code}}}
    $('.pop_up_menu_box > i, .head_menu_but').click(function () {
        $('.head_menu_but').toggleClass('head_menu_but_open');
        $('.pop_up_menu_box').toggleClass('pop_up_menu_show');
    });
    
    //关闭弹框
    $('.christmas_close_2,.christmas_main_but').click(function(){
        ac_val += 1;
        $('.christmas_popup_box').remove();
        $.fn.cookie('ac_val',ac_val,{expires: 0.33, path: '/'});
    });
    
    
});
</script>
 <script type="text/javascript">
	
	$("body").on('click',".btn_login", function() {
		$("div.err_msg").html('').hide();
		var self = $(this);
			var form = $("form#login");
			var status = Valid(form);
			if (status) {
			$("#mobile_lable").html($("#mobile").val());
			
				$.post('{:url('/login/phone')}' , form.serialize(), function(rsp) {
				if (rsp && rsp.code == 1) {
					window.location.href = rsp.data.backurl;
				} else if (rsp.msg) {
					$("div.err_msg").html(rsp.msg).show();
					$("img.captcha").click();
				}
			}, 'json')
		}
		return false;
	});
	var Valid = function(el) {
		var status = true;
		el.find('input.required,textarea.required').each(function(i, n) {
			if ($(n).val() == '') {
				$(n).parent().addClass('error');
				status = false;
			}
		});
		return status;
	}

	</script>
{/block}